package com.umeox.watch.moto.dataservice.db.model;


import androidx.annotation.NonNull;
import androidx.room.Entity;
import androidx.room.Ignore;
import androidx.room.PrimaryKey;

@Entity(tableName = StepInfo.TABLE_NAME)
public class StepInfo {
    @Ignore
    public static final String TABLE_NAME = "step_info";

    @NonNull
    @PrimaryKey
    private String deviceId;

    private int level;

    private double percent;

    private String totalStepValue;

    private int planStepValue = 5000;//当日计步目标值

    private int reachGoalTimes = 0;//累计完成计步目标次数

    private int reachGoal = 0;//当日是否已完成目标

    public String getDeviceId() {
        return deviceId;
    }

    public void setDeviceId(String deviceId) {
        this.deviceId = deviceId;
    }

    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }

    public double getPercent() {
        return percent;
    }

    public void setPercent(double percent) {
        this.percent = percent;
    }

    public String getTotalStepValue() {
        return totalStepValue;
    }

    public void setTotalStepValue(String totalStepValue) {
        this.totalStepValue = totalStepValue;
    }

    public int getPlanStepValue() {
        return planStepValue;
    }

    public void setPlanStepValue(int planStepValue) {
        this.planStepValue = planStepValue;
    }

    public int getReachGoalTimes() {
        return reachGoalTimes;
    }

    public void setReachGoalTimes(int reachGoalTimes) {
        this.reachGoalTimes = reachGoalTimes;
    }

    public void setReachGoal(int reachGoal) {
        this.reachGoal = reachGoal;
    }

    public boolean isReachGoal() {
        return reachGoal == 1 ? true : false;
    }

    public int getReachGoal() {
        return reachGoal;
    }

    @Override
    public String toString() {
        return "StepInfo{" +
                "deviceId='" + deviceId + '\'' +
                ", level=" + level +
                ", percent=" + percent +
                ", totalStepValue='" + totalStepValue + '\'' +
                ", planStepValue=" + planStepValue +
                ", reachGoalTimes=" + reachGoalTimes +
                ", reachGoal=" + reachGoal +
                '}';
    }
}
